<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$return['item']=$this->plugin_setting('basic');
	$return['item']['footernav']=$return['item']['footernav']?$return['item']['footernav']:$footernav;
	$return['item']=$item;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'直播小程序',
		'tabs'=>$tabs,
		'edit'=>array(
			array('type'=>'switch','name'=>'isopen','title'=>'是否开启','help'=>'默认关闭，开启前请确认商品，小程序直播等都设置好了，否则不显示或者显示了访问直接间异常'),
			array('type'=>'image','title'=>'小程序二维码','name'=>'ewm'),
			array('type'=>'switch','title'=>'是否开启虚拟成交额','name'=>'istotalfee','help'=>'开启后，前端直播间列表，展示的是虚拟成交额'),
			array('type'=>'unitstring','unit'=>'元','title'=>'随机成交额下限','name'=>'mintotalfee','help'=>'真实成交额低于下限，才显示随机虚拟成交额'),
			array('type'=>'unitstring','unit'=>'元','title'=>'随机成交额上限','name'=>'maxtotalfee','help'=>''),
		)
	);
	$return['htmls']=$htmls;
	$coupon=pdo_getall('jy_weishop_coupon',array('uniacid'=>$_SESSION['uniacid']),array('id','title'));
	$return['coupon']=array();
	foreach($coupon as $v){
		$id=$v['id'];
		$return['coupon'][$id]=$v['title'];
	}
	$return['getfeetypes']=array(0=>'最终成交直播间',1=>'最初访问直播间');
	exi($return);
}
/*******basic*******/
/*******op*******/
